<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>作业统计</title>
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <link rel="stylesheet" type="text/css" href="<%=path %>/css/f/default.css"/>
	<link rel="stylesheet" type="text/css" href="<%=path %>/css/f/navs.css"/>
	<link rel="stylesheet" type="text/css" href="<%=path %>/css/f/assignment.css"/>
	<script src="js/jquery.min.js"></script>
	<script src="js/f/default.js"></script>
	<script type="text/javascript" src="js/f/countwork.js?v=2"></script>
  </head>
  
  <body>
    <div class="all">
  		<jsp:include page="/nav.jsp"></jsp:include>
  		<div class="rightall float-left" id="seeCount">
  			<div class="already">
  				<div class="already-title">
  					<div class="left">作业统计</div>
  				</div>
	  			<form method="post" action="teacher/countwork.do">
	                <div style="margin-top: 15px;">
	                <span style=" margin-left:35%;"></span>
	                	班级:<select class="task" name="content">
                                <c:forEach var="s" items="${cour}">
                                    <option value="${s.className }">${s.className }</option>
                                </c:forEach>
	                    </select>
	                	<span style=" margin-left:50px;"></span>
	                	<button class="task btn-style" type="submit" >查找</button>
	                </div>
	            </form>
	            <table>
	            	<tr class="tr-style-head">
	            		<td>班级</td>
	            		<td>作业内容</td>
	  					<td class="f-width">作业文件</td>
	            		<td>合格率</td>
	            		<td>提交率</td>
	            		<td class="w-width">操作</td>
	            	</tr>
	            	<c:forEach var="s"	items="${hws}">
		            	<tr class="tr-style">
		            		<td>${s.className }</td>
		            		<td>${s.homeworkContent }</td>
		  					<td><a href="#" class="a-color-blue">下载</a></td>
		            		<td>${s.qualified*100}/100</td>
		            		<td>${s.submission*100}/100</td>
		            		<td>
		            			<input type="hidden" id="homeworkId" value="${s.homeworkId }"/>
		            			<input type="hidden" id="className" value="${s.className }"/>
		            			<a class="a-color-red" id="a" onclick="seeNoCount(),queryUnqualified(1,this)">查看不合格人员</a>/
		            			<a class="a-color-red" id="b" onclick="seeNoCorre(),queryUnsubmission(1,this)">查看未提交人员</a>
		            		</td>
		            	</tr>
	            	</c:forEach>
	            </table>
	            <c:if test="${pages > 1}">
               		<div class="previous">
	               		<c:if test="${pageNo>1}">
	                    	<a href="teacher/countwork.do?pageNo=${pageNo-1}">上一页</a>
	                	</c:if>
	                   	<c:forEach var="p" begin="1" end="${pages }" step="1">
	                   		<c:if test="${p==pageNo }">
	                   			<span style="font-size:14px;color:#446ee6;">&nbsp;${p}&nbsp;</span>
	                   		</c:if>
	                   		<c:if test="${p!=pageNo }">
	                   			<a href="teacher/countwork.do?pageNo=${p }" >&nbsp;${p}&nbsp;</a>
	                   		</c:if>
	                   	</c:forEach>
	                    <c:if test="${pageNo<pages}">
	                    	<a href="teacher/countwork.do?pageNo=${pageNo+1}">下一页</a>
	                	</c:if>
                   </div>
                </c:if>
  			</div>
  		</div>
  		<div class="rightall float-left" id="seeNoCount">
  			<div class="already">
  				<div class="already-title">
  					<div class="left">不合格人员</div>
  					<div class="left float-right">
  						<span style="cursor:pointer;float:right;margin-right:20px;" onclick="seeCount()">返回统计列表</span>
  					</div>
  				</div>
  				<table id="tb">
  					<tr class="tr-style-head">
  						<td>班级</td>
  						<td>姓名</td>
  						<td>作业内容</td>
  						<td>成绩</td>
  						<td>状态</td>
  					</tr>
  				</table>
				<div class="previous cc">
					
				</div>
  			</div>
  		</div>
  		<div class="rightall float-left" id="seeNoScore">
  			<div class="already">
  				<div class="already-title">
  					<div class="left">未提交人员</div>
  					<div class="left float-right">
  						<span style="cursor:pointer;float:right;margin-right:20px;" onclick="seeCount1()">返回统计列表</span>
  					</div>
  				</div>
  				<table id="ta">
  					<tr class="tr-style-head">
  						<td>班级</td>
  						<td>姓名</td>
  						<td>作业内容</td>
  						<td>成绩</td>
  						<td>状态</td>
  					</tr>
  				</table>
				<div class="previous aa">
					
				</div>
  			</div>
  		</div>
  	</div>
  </body>
  <script type="text/javascript">
	function seeNoCount(){ 
		var popUp = document.getElementById("seeNoCount"); 
		popUp.style.display = "block";
		var seeclass=document.getElementById("seeCount");
		seeclass.style.display = "none";
	}
	//返回成绩统计
	function seeCount(){ 
		var popUp = document.getElementById("seeNoCount"); 
		popUp.style.display = "none"; 
		var seeclass=document.getElementById("seeCount");
		seeclass.style.display = "block";
	}
	function seeNoCorre(){
		var pop = document.getElementById("seeNoScore"); 
		pop.style.display="block";
		var seeclass=document.getElementById("seeCount");
		seeclass.style.display = "none";
	}
	//返回成绩统计
	function seeCount1(){ 
		var popUp = document.getElementById("seeNoScore"); 
		popUp.style.display = "none"; 
		var seeclass=document.getElementById("seeCount");
		seeclass.style.display = "block";
	}
  </script>
</html>
